package com.yanqu.road.logic.bussiness.activity;

import com.yanqu.road.entity.activity.entername.ChannelFightMatchRule;
import com.yanqu.road.entity.activity.entername.ChannelFightZone;
import com.yanqu.road.entity.activity.pasture.config.*;
import com.yanqu.road.entity.activity.pasture.cross.CrossPastureUserData;
import com.yanqu.road.logic.bussiness.DaoHelper;

import java.util.List;
import java.util.Map;

/**
 * 牧场点兵(跨地区)
 */
public class CrossPastureBussiness {

    public static Map<Integer, PastureAnimalConfig> getPastureAnimalConfigMap(String dbParam, int activityId) {
        return DaoHelper.getCrossPastureConfigDaoImpl(dbParam).getPastureAnimalConfig(activityId);
    }

    public static Map<Integer, PastureSkillConfig> getPastureSkillConfigMap(String dbParam, int activityId) {
        return DaoHelper.getCrossPastureConfigDaoImpl(dbParam).getPastureSkillConfig(activityId);
    }

    public static Map<Integer, PastureModuleConfig> getPastureModuleConfigMap(String dbParam, int activityId) {
        return DaoHelper.getCrossPastureConfigDaoImpl(dbParam).getPastureModuleConfig(activityId);
    }

    public static Map<Integer, Map<Integer, PasturePracticeConfig>> getPasturePracticeConfigMap(String dbParam, int activityId) {
        return DaoHelper.getCrossPastureConfigDaoImpl(dbParam).getPasturePracticeConfig(activityId);
    }


//    public static List<ChannelFightMatchRule> getPastureFightMatchRuleList(String dbParam, int activityId){
//        return DaoHelper.getCrossPastureConfigDaoImpl(dbParam).getPastureFightMatchRuleList(activityId);
//    }
//
//    public static List<ChannelFightZone> getPastureFightZoneList(String dbParam, int activityId){
//        return DaoHelper.getCrossPastureConfigDaoImpl(dbParam).getPastureFightZoneList(activityId);
//    }

    // 牧场数据
    public static CrossPastureUserData getPastureUserData(int activityId, long userId) {
        return DaoHelper.getCrossPastureUserDataDaoImpl().getUserData(activityId, userId);
    }

    public static boolean addPastureUserData(CrossPastureUserData userData) {
        return DaoHelper.getCrossPastureUserDataDaoImpl().add(userData);
    }

    public static boolean updatePastureUserData(CrossPastureUserData userData) {
        return DaoHelper.getCrossPastureUserDataDaoImpl().update(userData);
    }
}
